import type { InventoryHistoryType } from '@/DatabaseType/InventoryHistory';

export function stockIsUnsigned(calcNub: number, type: InventoryHistoryType, beCalcNub: number) {
  return calcInventoryStock(calcNub, type, beCalcNub) >= 0;
}

export function calcInventoryStock(calcNub: number, type: InventoryHistoryType, beCalcNub: number) {
  return calcNub + Number(type) * beCalcNub;
}
